diff options
author | Mountain Man <43313373+MountainMan1312@users.noreply.github.com> | 2023-05-17 23:51:11 -0400 |
---|---|---|
committer | Mountain Man <43313373+MountainMan1312@users.noreply.github.com> | 2023-05-17 23:51:11 -0400 |
commit | 0e9c5bba140264efb1cbdb79ccf04c647e834d55 (patch) | |
tree | 036fe362ba349c5e12a8efefc4cae95ed7d1c036 | |
parent | Add all the icons (diff) | |
download | mmosmacs-0e9c5bba140264efb1cbdb79ccf04c647e834d55.tar.gz mmosmacs-0e9c5bba140264efb1cbdb79ccf04c647e834d55.tar.bz2 mmosmacs-0e9c5bba140264efb1cbdb79ccf04c647e834d55.zip |
Add the Garbage Collector Magic Hack
-rw-r--r-- | early-init.el | 13 | ||||
-rw-r--r-- | init.el | 19 |
2 files changed, 32 insertions, 0 deletions
diff --git a/early-init.el b/early-init.el index f53a8bc..f183fcc 100644 --- a/early-init.el +++ b/early-init.el | |||
@@ -7,6 +7,19 @@ | |||
7 | 7 | ||
8 | 8 | ||
9 | ;; --------------------------------------------------------------------- | 9 | ;; --------------------------------------------------------------------- |
10 | ;;; Performance hacks | ||
11 | ;; ------------------ | ||
12 | ;; These hacks subjectively make Emacs perform "better" | ||
13 | ;; --------------------------------------------------------------------- | ||
14 | |||
15 | ;; Defer garbage collection until later in the startup process | ||
16 | (setq gc-cons-threshold most-positive-fixnum | ||
17 | gc-cons-percentage 0.6) | ||
18 | |||
19 | |||
20 | |||
21 | |||
22 | ;; --------------------------------------------------------------------- | ||
10 | ;;; UI Adjustments | 23 | ;;; UI Adjustments |
11 | ;; --------------- | 24 | ;; --------------- |
12 | ;; The primary goal of this Section is to prevent Emacs from flashing or | 25 | ;; The primary goal of this Section is to prevent Emacs from flashing or |
@@ -59,6 +59,25 @@ | |||
59 | 59 | ||
60 | 60 | ||
61 | ;; --------------------------------------------------------------------- | 61 | ;; --------------------------------------------------------------------- |
62 | ;; Performance hacks | ||
63 | ;; ----------------- | ||
64 | ;; These hacks subjectively make Emacs perform "better" | ||
65 | ;; --------------------------------------------------------------------- | ||
66 | |||
67 | ;; Garbage Collector Magic Hack | ||
68 | (use-package gcmh | ||
69 | :straight t | ||
70 | :defer t | ||
71 | :init | ||
72 | (setq gcmh-idle-delay 15 | ||
73 | gcmh-idle-delay-factor 10 | ||
74 | gcmh-high-cons-threshold (* 16 (* 1024 1024))) ;16mb | ||
75 | :hook (after-init-hook . gcmh-mode)) | ||
76 | |||
77 | |||
78 | |||
79 | |||
80 | ;; --------------------------------------------------------------------- | ||
62 | ;;; Graphical Environment | 81 | ;;; Graphical Environment |
63 | ;; ---------------------- | 82 | ;; ---------------------- |
64 | ;; MMOSMacs is intended to be my entire Desktop Environment. | 83 | ;; MMOSMacs is intended to be my entire Desktop Environment. |